/*
 * Copyright (c) 2012-2014, EpicSaaS Yuan Xin technology Co., Ltd.
 * 
 * All rights reserved.
 */
/*
 * 
 * Support: http://www.huqiuhsc.com
 * License: http://www.huqiuhsc.com/license
 */
package com.epicsaas.app.ksdapp.android.bean;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 商品
 * 
 * @author ghg
 * 
 */
public class Product implements Serializable {

    private static final long serialVersionUID = -2300760218308584140L;

    /** 当前时间 */
    private long nowDate;

    /** 购物车中商品Id */
    private int productId;

    /** id */
    private long id;

    /** goods name */
    private String name;

    /** 图片路径 */
    private String image;

    /** 价格 */
    //	private float price;

    /** 市场价 */
    private float referencePrice;

    /** 购物车中市场价 */
    private float referenceValue;

    /** 折扣 */
    // private BigDecimal discount;

    /** 是否置顶 */
    private boolean isTop;

    /** 优惠Id */
    private int promotionId;

    /** 优惠类型 */
    private String preferentialType;

    /** 开始时间 */
    private long startTime;

    /** 结束时间 */
    private long endTime;

    /** 销售额 */
    private int sales;

    /** 单位 */
    private String unit;

    /** 重量 */
    private int weight;

    /** 点击数 */
    private int hits;

    /** 评论数 */
    private int reviewCount;

    /** 喜欢数 */
    private int favoriteCount;

    /** 是否喜欢 */
    private boolean isFavorite;

    /** 商品图片 */
    private List<ProductImage> productImages;

    /** 商品sku */
    private List<SkuProduct> items;

    /** 商品规格 */
    private List<Specifications> specifications;

    /** 商品规格 */
    private List<SpecificationValues> specificationValues;

    /** 供分享的路径path */
    private String path;

    /** 组合购列表 */
    private List<ProductGroup> productGroups;

    /** 优惠套餐列表 */
    private List<ProductBundle> bundles;

    /** 尺码，颜色 */
    private Map<String, String> values;

    // item
    // private String id;
    // 分类id
    private Integer categoryId;

    // 商品名称
    private String title;

    // 品牌名称
    private String brand;

    // 库存
    // private Integer stock;

    // 最小订货量
    private Integer minNumber;

    // 是否是正品
    // private Byte isBest;

    // spec 规格
    private String spec;

    // 计量单位
    // private Byte unit;

    // 供应价
    // private BigDecimal price;

    // 退货类型
    private String tuihuo;

    // 商品描述
    private String description;

    // 创建时间
    // private Date createTime;

    // 更新时间
    // private Date updateTime;

    /**
     * 创建人
     */
    private Integer userId;

    /**
     * 供货商id
     */
    private Integer supplierId;

    /**
     * 商品状态
     */
    // private Byte status;

    /**
     * 审核意见
     */
    private Byte auditStatus;

    // item_image
    // private Integer itemId;

    /**
     * pic_path 图片路径
     */
    private String picPath;

    /**
     * 商品在商品页面的位置
     */
    private Integer position;

    /**
     * 创建时间
     */
    // private Date createTime;

    /**
     * pic_large 剪切后大图照片
     */
    private String picLarge;

    /**
     * pic_small 剪切后小图照片
     */
    private String picSmall;

    // shop_item

    /**
     * shop_id 店铺ID
     */
    private String shopId;

    /**
     * item_id 商品ID
     */
    private String itemId;

    /**
     * status 状态（上架，下架）
     */
    private Byte status;

    /**
     * price 现货价格
     */
    private BigDecimal price;

    /**
     * pre_price 订购价格
     */
    private BigDecimal prePrice;

    /**
     * update_time 更新时间
     */
    private Date updateTime;

    /**
     * gross_rate 毛利率
     */
    private Integer grossRate;

    /**
     * discount 订购折扣
     */
    private BigDecimal discount;

    /**
     * is_boli 是否薄利多销
     */
    private Byte isBoli;

    /**
     * is_best 是正品
     */
    private Byte isBest;

    /**
     * check_first 先看后买
     */
    private Byte checkFirst;

    /**
     * create_time 上架时间
     */
    private Date createTime;

    /**
     * stock 储量
     */
    private Integer stock;

    public Product() {
        super();
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public Integer getMinNumber() {
        return minNumber;
    }

    public void setMinNumber(Integer minNumber) {
        this.minNumber = minNumber;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public String getTuihuo() {
        return tuihuo;
    }

    public void setTuihuo(String tuihuo) {
        this.tuihuo = tuihuo;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Integer supplierId) {
        this.supplierId = supplierId;
    }

    public Byte getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(Byte auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getPicPath() {
        return picPath;
    }

    public void setPicPath(String picPath) {
        this.picPath = picPath;
    }

    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }

    public String getPicLarge() {
        return picLarge;
    }

    public void setPicLarge(String picLarge) {
        this.picLarge = picLarge;
    }

    public String getPicSmall() {
        return picSmall;
    }

    public void setPicSmall(String picSmall) {
        this.picSmall = picSmall;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public BigDecimal getPrePrice() {
        return prePrice;
    }

    public void setPrePrice(BigDecimal prePrice) {
        this.prePrice = prePrice;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getGrossRate() {
        return grossRate;
    }

    public void setGrossRate(Integer grossRate) {
        this.grossRate = grossRate;
    }

    public Byte getIsBoli() {
        return isBoli;
    }

    public void setIsBoli(Byte isBoli) {
        this.isBoli = isBoli;
    }

    public Byte getIsBest() {
        return isBest;
    }

    public void setIsBest(Byte isBest) {
        this.isBest = isBest;
    }

    public Byte getCheckFirst() {
        return checkFirst;
    }

    public void setCheckFirst(Byte checkFirst) {
        this.checkFirst = checkFirst;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public float getReferenceValue() {
        return referenceValue;
    }

    public void setReferenceValue(float referenceValue) {
        this.referenceValue = referenceValue;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public Map<String, String> getValues() {
        return values;
    }

    public void setValues(Map<String, String> values) {
        this.values = values;
    }

    public List<SpecificationValues> getSpecificationValues() {
        return specificationValues;
    }

    public void setSpecificationValues(List<SpecificationValues> specificationValues) {
        this.specificationValues = specificationValues;
    }

    public List<ProductGroup> getProductGroups() {
        return productGroups;
    }

    public void setProductGroups(List<ProductGroup> productGroups) {
        this.productGroups = productGroups;
    }

    public List<ProductBundle> getBundles() {
        return bundles;
    }

    public void setBundles(List<ProductBundle> bundles) {
        this.bundles = bundles;
    }

    public long getNowDate() {
        return nowDate;
    }

    public void setNowDate(long nowDate) {
        this.nowDate = nowDate;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public float getReferencePrice() {
        return referencePrice;
    }

    public void setReferencePrice(float referencePrice) {
        this.referencePrice = referencePrice;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public boolean isTop() {
        return isTop;
    }

    public void setTop(boolean isTop) {
        this.isTop = isTop;
    }

    public int getPromotionId() {
        return promotionId;
    }

    public void setPromotionId(int promotionId) {
        this.promotionId = promotionId;
    }

    public String getPreferentialType() {
        return preferentialType;
    }

    public void setPreferentialType(String preferentialType) {
        this.preferentialType = preferentialType;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public int getSales() {
        return sales;
    }

    public void setSales(int sales) {
        this.sales = sales;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public int getHits() {
        return hits;
    }

    public void setHits(int hits) {
        this.hits = hits;
    }

    public int getReviewCount() {
        return reviewCount;
    }

    public void setReviewCount(int reviewCount) {
        this.reviewCount = reviewCount;
    }

    public int getFavoriteCount() {
        return favoriteCount;
    }

    public void setFavoriteCount(int favoriteCount) {
        this.favoriteCount = favoriteCount;
    }

    public boolean isFavorite() {
        return isFavorite;
    }

    public void setFavorite(boolean isFavorite) {
        this.isFavorite = isFavorite;
    }

    public List<ProductImage> getProductImages() {
        return productImages;
    }

    public void setProductImages(List<ProductImage> productImages) {
        this.productImages = productImages;
    }

    public List<SkuProduct> getItems() {
        return items;
    }

    public void setItems(List<SkuProduct> items) {
        this.items = items;
    }

    public List<Specifications> getSpecifications() {
        return specifications;
    }

    public void setSpecifications(List<Specifications> specifications) {
        this.specifications = specifications;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    /**
     * @author fbl 商品规格
     */
    public static class Specifications {

        /** 产品ID */
        private long id;

        /** 分类值 */
        private String name;

        /** 类型 */
        private String type;

        /** 通知 */
        private String memo;

        /** 选择的那个 */
        private int check = 0;

        /** 规格值的数组 */
        private List<SpecificationValues> specificationValues;

        public int getCheck() {
            return check;
        }

        public void setCheck(int check) {
            this.check = check;
        }

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getMemo() {
            return memo;
        }

        public void setMemo(String memo) {
            this.memo = memo;
        }

        public List<SpecificationValues> getSpecificationValues() {
            return specificationValues;
        }

        public void setSpecificationValues(List<SpecificationValues> specificationValues) {
            this.specificationValues = specificationValues;
        }

    }

    /**
     * @author fbl product sku
     */
    public static class SkuProduct implements Serializable {

        private static final long serialVersionUID = 4261999710349227064L;

        /** sku id */
        private long id;

        /** goodId */
        private long productId;

        /** sku name */
        private String name;

        /** 重量 */
        private int weight;

        /** 图片路径 */
        private String image;

        /** 价格 */
        private float price;

        /** 市场价 */
        private float marketPrice;

        /** 为了在订单页面显示商品数量 */
        private int quantity;

        public String getImage() {
            return image;
        }

        public void setImage(String image) {
            this.image = image;
        }

        public long getProductId() {
            return productId;
        }

        public void setProductId(long productId) {
            this.productId = productId;
        }

        public int getQuantity() {
            return quantity;
        }

        public void setQuantity(int quantity) {
            this.quantity = quantity;
        }

        private List<SpecificationValues> specificationValues;

        public List<SpecificationValues> getSpecificationValues() {
            return specificationValues;
        }

        public void setSpecificationValues(List<SpecificationValues> specificationValues) {
            this.specificationValues = specificationValues;
        }

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getWeight() {
            return weight;
        }

        public void setWeight(int weight) {
            this.weight = weight;
        }

        public float getPrice() {
            return price;
        }

        public void setPrice(float price) {
            this.price = price;
        }

        public float getMarketPrice() {
            return marketPrice;
        }

        public void setMarketPrice(float marketPrice) {
            this.marketPrice = marketPrice;
        }

    }

    /**
     * 商品规格
     * 
     * @author
     *
     */
    public static class SpecificationValues {

        /**  */
        private long id;

        /**  */
        private String name;

        private boolean isCheck;

        public boolean isCheck() {
            return isCheck;
        }

        public void setCheck(boolean isCheck) {
            this.isCheck = isCheck;
        }

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}
